import React, { Component } from "react";
// import React, { Component, Fragment } from "react";

// 约定: 建议组件的文件名首字母大写，组件的后缀写成jsx
import Header from "./Header";

const str = "按钮";
const str2 = "abc";

const Button = () => {
  return <button title={str2}>{str + "!!!!!"}</button>;
};

class Content extends Component {
  render() {
    return (
      <main>
        这是内容 - <Button />
      </main>
    );
  }
}

// 创建app根组件
class App extends Component {
  render() {
    return (
      // Fragment相当于vue的template,空的占位标签
      <>
        <h2>app根组件</h2>
        <Header></Header>

        <Content />
      </>
    );
  }
}

export default App;
